<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>02-Vue列表渲染</title>
</head>
<body>
<div id="app">

    <table border="1px" cellpadding="10px" cellspacing="0px" rules="all" width="400px" height="300px">
        <tr>
            <th>序号</th>
            <th>编号</th>
            <th>姓名</th>
            <th>年龄</th>
        </tr>

        <tr v-for="(stu,index) in stuList">
            <td v-text="index"></td>
            <td v-text="stu.stuId"></td>
            <td v-text="stu.stuName"></td>
            <td v-text="stu.age"></td>
        </tr>

    </table>


</div>

</body>
<script src="js/vue.js"></script>
<script>

    var vue = new Vue({
        el: "#app",
        data: {
            stuList:[
                {
                    stuId:1,
                    stuName:"韦震",
                    age:18
                },
                {
                    stuId:2,
                    stuName:"胡清源",
                    age:19
                },
                {
                    stuId:3,
                    stuName:"何英杰",
                    age:20
                }
            ]


        },
        methods: {}
    })

</script>
</html>